<template>
  <div>
    <CellGroup title="页面展示">
      <Cell is-link title="我的页面一" @click="router.push({ path: '/my/profile1' })"></Cell>
      <Cell is-link title="我的页面二" @click="router.push({ path: '/my/profile2' })"></Cell>
      <Cell is-link title="wechat" @click="router.push({ path: '/wx/wxauth' })"></Cell>
      <Cell is-link title="第一次授权" @click="router.push({ path: '/wx/wxfirstauth' })"></Cell>
 
    </CellGroup>
    <CellGroup title="常规操作">
      <Cell is-link clickable title="退出登录" title-style="color:red;" @click="onLogout"></Cell>
    </CellGroup>
  </div>
</template>

<script setup name="My">
import { Cell, CellGroup } from "vant";
import { useRouter } from "vue-router";
import { useUserStore } from "@/stores/user";

const userStore = useUserStore();
const router = useRouter();

function onLogout() {
  userStore.LogOut().then(() => {
    router.push({ path: "/login" });
  });
}
</script>

<style>
</style>